<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text" id='a'>
    <button id='b'>点击</button>
    <script>
        // 判断一个整数，属于哪个范围：大于0，小于0，等于0
        var aEle=document.getElementById('a')
        var bEle=document.getElementById('b')
        b.onclick=function(){
            var a=parseInt(aEle.value)
            if(a>0){
                console.log('大于0')

            }else if(a<0){
                console.log('小于0')

            }else if(a==0){
                console.log('等于0')

            }else{
                console.log('请重新确认！')
            }
        }
    </script>
  <!--   第二题（X）没做对
    <input type="text" id='a'>
    <button id='b'>点击</button>
   
    <script>
        // 判断奇数和偶数
        var aEle=document.getElementById('a')
        var bEle=document.getElementById('b')
        b.onclick=function(){
        if(a % 2==0){
            console.log('偶数');
        }else {
            console.log('奇数');
        }
        }

    </script> -->
</body>
</html>